package com.kamistoat.meimeichat.meimeichatserverapplication.netty.utils;

/**
 * Netty Server 常量
 */
public class NettyConstants {

    public enum ResponseCode {
        SUCCESS("0000", "成功"),
        UN_ERROR("0001", "未知失败"),
        ILLEGAL_PARAMETER("0002", "非法参数"),
        INDEX_DUP("0003", "主键冲突");

        private String code;
        private String info;

        ResponseCode(String code, String info) {
            this.code = code;
            this.info = info;
        }

        public String getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }

    }

    /**
     * 聊天类型-私聊/群聊
     */
    public enum TalkType {
        Friend(0, "好友"),
        Group(1, "群组");

        private Integer code;
        private String info;

        TalkType(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }

    }


    /**
     * 聊天框显示状态-展开/收起
     */
    public enum TalkBoxShowStatus {
        OPEN(0, "展开"),
        STACK(1, "收起");

        private Integer code;
        private String info;

        TalkBoxShowStatus(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }

    }

    /**
     * 消息发送者标识-自己/好友
     */
    public enum MsgUserType{

        Myself(0, "自己"),
        Friend(1, "好友");

        private Integer code;
        private String info;

        MsgUserType(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }
    }


    /**
     * 好友状态
     */
    public enum FriendRelationType{

        Normal(0, "正常(已添加)"),
        Deleted(1, "已删除"),
        Blocked(2, "已拉黑"),
        Foreign(3, "未添加");

        private Integer code;
        private String info;

        FriendRelationType(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }
    }


    /**
     * 在线状态
     */
    public enum OnLineStatus{

        OnLine(0, "在线"),
        OffLine(1, "离线");

        private Integer code;
        private String info;

        OnLineStatus(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }
    }

    /**
     * UDP确认状态
     */
    public enum UDP_ANSWER_CONFIRM_STATUS{

        Half_Confirm(0, "半确认"),
        Full_Confirm(1, "全确认");

        private Integer code;
        private String info;

        UDP_ANSWER_CONFIRM_STATUS(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }
    }

}
